<form id="pagerForm" method="post" action="{:url('Company/index')}">
    <input type="hidden" name="company_name" value="{$company_name|default=''}"/>
    <input type="hidden" name="telephone" value="{$telephone|default=''}"/>
    <input type="hidden" name="pageNum" value="{$pageNum}"/>
</form>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="{:url('Company/index')}" method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        商家名称：<input type="text" name="company_name" value="{$company_name|default=''}"/>
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">搜索</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a rel="brandManageAdd" class="add" href="{:url('Company/add')}" target="navTab"  title="添加商户"><span>添加</span></a></li>
            <li><a rel="brandManageModify" class="edit" href="{:url('Company/modify')}?id={userId}" target="navTab"  title="商户信息修改"><span>修改</span></a></li>
<!--            <li><a class="delete" href="{:url('Company/doDelete')}?id={userId}" target="ajaxTodo" title="确定要删除吗？"><span>删除</span></a></li>-->
<!--            <li><a rel="brandManageAdd" class="add" href="{:url('Company/addVehicle')}?id={userId}" target="navTab" title="添加承检车型"><span>添加承检车型</span></a></li>-->
        </ul>
    </div>
    <table class="table" width="101.7%" layoutH="133">
        <thead>
        <tr>
            <th width="10%">商家名称</th>
            <th width="8%">商家电话</th>
            <th width="20%">企业地址</th>
            <th width="10%">商家描述</th>
            <th width="6%">商家LOGO</th>
            <th width="8%">负责人姓名</th>
            <th width="3%">排序</th>
            <th width="11%">创建时间</th>
            <th width="5%">当前状态</th>
            <th width="6%">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="vo"}
        <tr target="userId" rel="{$vo.id}">
            <td>{$vo.company_name}</td>
            <td>{$vo.telephone}</td>
            <td>{$vo.province|region_name}{$vo.city|region_name}{$vo.district|region_name}{$vo.company_addr}</td>
            <td>{$vo.company_desc}</td>
            {empty name="vo.logo_url"}
            <td><a onclick="$(this).colorbox({height: 600});return false;" href="__STATIC__/admin/images/no_photo.png">查看图片</a></td>
            {else /}
            <td><a onclick="$(this).colorbox({height: 600});return false;" href="{$Think.config.image_url}/{$vo.logo_url}">查看图片</a></td>
            {/empty}

            <td>{$vo.shop_leader}</td>
            <td>{$vo.sort}</td>
            <td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
            <td>
                {switch name="$vo.is_use"}
                {case value="0"}
                <span style="color: red;margin-top: 5px;display: block">禁用</span>
                {/case}
                {case value="1"}
                <span style="color: green;margin-top: 5px;display: block">启用</span>
                {/case}
                {/switch}
            </td>
            <td>
                <a rel="" class="detail" href="{:url('company/detail')}?id={$vo.id}" target="dialog" width="600" height="400" title="详情" mask="true">详情</a>
                {switch name="$vo.is_use"}
                {case value="0"}
                <a rel="companyManage" href="{:url('Company/on_off')}?id={$vo.id}&status=1" target="ajaxTodo" title="确定要启用吗？">启用</a>
                {/case}
                {case value="1"}
                <a rel="companyManage" href="{:url('Company/on_off')}?id={$vo.id}&status=0" target="ajaxTodo" title="确定要禁用吗？">禁用</a>
                {/case}
                {/switch}
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>共{$count}条</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount="{$count}" numPerPage="{$numPerPage}" pageNumShown="10"
             currentPage="{$pageNum}"></div>
    </div>
</div>
